Strict equality (===) | 您所在的位置:网站首页 › Strict equality === › Strict equality (===) |
The strict equality operators (=== and !==) provide the IsStrictlyEqual semantic. If the operands are of different types, return false. If both operands are objects, return true only if they refer to the same object. If both operands are null or both operands are undefined, return true. If either operand is NaN, return false. Otherwise, compare the two operand's values: Numbers must have the same numeric values. +0 and -0 are considered to be the same value. Strings must have the same characters in the same order. Booleans must be both true or both false.The most notable difference between this operator and the equality (==) operator is that if the operands are of different types, the == operator attempts to convert them to the same type before comparing. |
CopyRight 2018-2019 实验室设备网 版权所有 |